package com.monitor.entity.response;

import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * 响应码.
 *
 * @author Li Zhiyuan
 * @since 2020-11-12
 */
@Getter
public enum ResultCode {
    SUCCESS(HttpStatus.OK.value(), "方法调用正常"),
    error(HttpStatus.INTERNAL_SERVER_ERROR.value(), "服务器调用异常"),

    //登录 1001-1999
    COMPANY_USER_NOT_EXIST(1001, "用户不存在"),
    COMPANY_LOGIN_TIMEOUT(1002, "登录超时,请重新登录"),
    COMPANY_PASSWORD_ERROR(1003, "账号或密码错误"),
    COMPANY_LOGIN_successful(1004, "登录成功"),
    NO_AUTHORITY(1005, "没有权限"),
    COMPANY_TEL_EXIST(1006, "该用户已存在"),
    ENTERPRISE_NAME(1007, "该企业名称已存在"),

    //摄像头模块 2001-2999
    BINDING(2001,"摄像头绑定企业账号成功"),
    MAC(2002,"该摄像头唯一标识mac没有绑定企业账号"),
    DUPLICATEUNIQUEID(2003,"摄像头唯一标识已存在，请确认"),

    //渣土车摄像头数据传输 3001-3999
    UPLOAD(3001,"数据上传成功");

    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
